package com.yoyo.yyadsdk.api;

import com.yoyo.yyadsdk.bean.BaiduAddressBean;
import com.yoyo.yyadsdk.bean.BaseBean;
import com.yoyo.yyadsdk.bean.DayWordBean;
import com.yoyo.yyadsdk.bean.MyObservable;
import com.yoyo.yyadsdk.bean.PullBean;
import com.yoyo.yyadsdk.bean.UpdateBean;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface IConfigApi {

    /**
     * lastTime 最后更新时间 searchIp 是否需要获取Ip 1 需要
     */
    @POST("router/getAdvConfig1")
    @FormUrlEncoded
    Observable<String> getConfig(@Field("sign") String sign);
//    Observable<PullBean> getConfig(@Field("sign") String sign);
//    Observable<BaseBean<PullBean>> getConfig(@Field("sign") String sign);
//    Observable<BaseBean<PullBean>> getConfig(@Field("lastTime") long lastTime, @Field("searchIp") String searchIp);

    //百度逆地理编码
    @GET("geocoder/v2/?output=json&latest_admin=1&ak=uvLrK7GtG977WAIuPcUUECw1tTtWc8iR&mcode=27:19:6E:38:6B:87:5E:76:AD:F7:00:E7:EA:84:E4:C6:EE:E3:3D:FA;com.yoyo.advlitesdk")
    Observable<BaiduAddressBean> getLocation(@Query("location") String attitude);

    // app更新接口
    @POST("router/appVersionUpdate")
    Observable<UpdateBean> update(@Query("sign") String qid);

    // 每日一言接口
    @POST("getLockScreenInfo")
    Observable<DayWordBean> getDayWord(@Query("channelCode") int channelCode);
}
